#include "bsp_gpio.h"
#include "bsp_uart.h"
#include "sys_delay.h"
#include "bsp_timer.h"
#include "bsp_exti.h"
#include "bsp_adc.h"

void main(void)
{
    sys_disableGlobalInterrupt();
    bsp_InitGPIO();
    bsp_InitUart();
    bsp_InitTimer0();
    bsp_extiInit();
    sys_enableGlobalInterrupt();

    while (1) {
        bsp_UartSendString("=============================\r\n");
        bsp_ADCResultShow(ADC_CH2);
        delay_ms(50);
        bsp_ADCResultShow(ADC_CH3);
        delay_ms(50);
        bsp_ADCResultShow(ADC_CH4);
        delay_ms(50);
        bsp_ADCResultShow(ADC_CH5);
        delay_ms(50);
        bsp_ADCResultShow(ADC_CH6);
        delay_ms(50);
        bsp_ADCResultShow(ADC_CH7);
        delay_ms(50);
        bsp_UartSendString("=============================\r\n");

        delay_ms(1000);
    }
}
